package cn.com.dcr.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.com.dcr.pojo.Brand;
import cn.com.dcr.service.BrandService;

@Controller
@RequestMapping(value = "/brand")
public class BrandController {
	@Autowired
	private BrandService brandService;

	/**
	 * 品牌列表
	 * @return
	 */
	@RequestMapping(value="/list")
	public String list(@ModelAttribute(value="brand") Brand brand,Model model){
		List<Brand> brandList = brandService.selectBrandList(brand);
		model.addAttribute("brandList", brandList);
		return "brand/list";
	}
}
